🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / repository / src / commonMain / kotlin / org / meshtastic / core / repository / RadioConfigRepository.kt
Displaying Raw • Download
core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/RadioConfigRepository.kt bf929c20f274232e0eb8ddc19b2dc82403e99e5b (bf929c20) Text, 4.38 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository
Tff7b72import T7ee787kotlinx.coroutines.flow.Flow
Tff7b72import T7ee787org.meshtastic.proto.Channel
Tff7b72import T7ee787org.meshtastic.proto.ChannelSet
Tff7b72import T7ee787org.meshtastic.proto.ChannelSettings
Tff7b72import T7ee787org.meshtastic.proto.Config
Tff7b72import T7ee787org.meshtastic.proto.DeviceProfile
Tff7b72import T7ee787org.meshtastic.proto.DeviceUIConfig
Tff7b72import T7ee787org.meshtastic.proto.FileInfo
Tff7b72import T7ee787org.meshtastic.proto.LoRaRegionPresetMap
Tff7b72import T7ee787org.meshtastic.proto.LocalConfig
Tff7b72import T7ee787org.meshtastic.proto.LocalModuleConfig
Tff7b72import T7ee787org.meshtastic.proto.ModuleConfig
Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffTooManyFunctionsTa5d6ff"Tb4b4b4)
Tff7b72interface T56d364RadioConfigRepository Tb4b4b4{
T8b949e/** Flow representing the [ChannelSet] data store. */
Tff7b72val Te6edf3channelSetFlowTb4b4b4: Te6edf3FlowTff7b72<Te6edf3ChannelSetTff7b72>
T8b949e/** Clears the [ChannelSet] data in the data store. */
Tff7b72suspend Tff7b72fun Td2a8ffclearChannelSetTb4b4b4(Tb4b4b4)
T8b949e/** Replaces the [ChannelSettings] list with a new [settingsList]. */
Tff7b72suspend Tff7b72fun Td2a8ffreplaceAllSettingsTb4b4b4(Te6edf3settingsListTb4b4b4: Te6edf3ListTff7b72<Te6edf3ChannelSettingsTff7b72>Tb4b4b4)
T8b949e/** Updates the [ChannelSettings] list with the provided channel. */
Tff7b72suspend Tff7b72fun Td2a8ffupdateChannelSettingsTb4b4b4(Te6edf3channelTb4b4b4: Te6edf3ChannelTb4b4b4)
T8b949e/** Flow representing the [LocalConfig] data store. */
Tff7b72val Te6edf3localConfigFlowTb4b4b4: Te6edf3FlowTff7b72<Te6edf3LocalConfigTff7b72>
T8b949e/** Clears the [LocalConfig] data in the data store. */
Tff7b72suspend Tff7b72fun Td2a8ffclearLocalConfigTb4b4b4(Tb4b4b4)
T8b949e/** Updates [LocalConfig] from each [Config] oneOf. */
Tff7b72suspend Tff7b72fun Td2a8ffsetLocalConfigTb4b4b4(Te6edf3configTb4b4b4: Te6edf3ConfigTb4b4b4)
T8b949e/** Flow representing the [LocalModuleConfig] data store. */
Tff7b72val Te6edf3moduleConfigFlowTb4b4b4: Te6edf3FlowTff7b72<Te6edf3LocalModuleConfigTff7b72>
T8b949e/** Clears the [LocalModuleConfig] data in the data store. */
Tff7b72suspend Tff7b72fun Td2a8ffclearLocalModuleConfigTb4b4b4(Tb4b4b4)
T8b949e/** Updates [LocalModuleConfig] from each [ModuleConfig] oneOf. */
Tff7b72suspend Tff7b72fun Td2a8ffsetLocalModuleConfigTb4b4b4(Te6edf3configTb4b4b4: Te6edf3ModuleConfigTb4b4b4)
T8b949e/** Flow representing the combined [DeviceProfile] protobuf. */
Tff7b72val Te6edf3deviceProfileFlowTb4b4b4: Te6edf3FlowTff7b72<Te6edf3DeviceProfileTff7b72>
T8b949e/**
* Flow of the device's UI configuration, populated from [DeviceUIConfig] during the config handshake
* (STATE_SEND_UIDATA — 2nd packet in every handshake). Null until the first handshake completes or after
* [clearDeviceUIConfig] is called.
*/
Tff7b72val Te6edf3deviceUIConfigFlowTb4b4b4: Te6edf3FlowTff7b72<Te6edf3DeviceUIConfig?Tff7b72>
T8b949e/** Stores the [DeviceUIConfig] received from the device. */
Tff7b72suspend Tff7b72fun Td2a8ffsetDeviceUIConfigTb4b4b4(Te6edf3configTb4b4b4: Te6edf3DeviceUIConfigTb4b4b4)
T8b949e/** Clears the stored [DeviceUIConfig]; called at the start of each new handshake. */
Tff7b72suspend Tff7b72fun Td2a8ffclearDeviceUIConfigTb4b4b4(Tb4b4b4)
T8b949e/**
* Flow of [FileInfo] packets accumulated during STATE_SEND_FILEMANIFEST.
*
* Cleared at the start of each new handshake via [clearFileManifest].
*/
Tff7b72val Te6edf3fileManifestFlowTb4b4b4: Te6edf3FlowTff7b72<Te6edf3ListTff7b72<Te6edf3FileInfoTff7b72>Tff7b72>
T8b949e/** Appends a single [FileInfo] entry to [fileManifestFlow]. */
Tff7b72suspend Tff7b72fun Td2a8ffaddFileInfoTb4b4b4(Te6edf3infoTb4b4b4: Te6edf3FileInfoTb4b4b4)
T8b949e/** Clears the accumulated file manifest; called at the start of each new handshake. */
Tff7b72suspend Tff7b72fun Td2a8ffclearFileManifestTb4b4b4(Tb4b4b4)
T8b949e/**
* Flow of the firmware's region→modem-preset compatibility map ([LoRaRegionPresetMap]), populated from
* [org.meshtastic.proto.FromRadio.region_presets] during the config handshake (sent after metadata, before
* channels). Null when the connected firmware predates this message (< 2.8) or after [clearLoraRegionPresetMap].
* The local LoRa config UI uses it to constrain the preset picker to the presets legal in the selected region.
*/
Tff7b72val Te6edf3loraRegionPresetMapFlowTb4b4b4: Te6edf3FlowTff7b72<Te6edf3LoRaRegionPresetMap?Tff7b72>
T8b949e/** Stores the [LoRaRegionPresetMap] received from the device. */
Tff7b72suspend Tff7b72fun Td2a8ffsetLoraRegionPresetMapTb4b4b4(Te6edf3mapTb4b4b4: Te6edf3LoRaRegionPresetMapTb4b4b4)
T8b949e/** Clears the stored region→preset map; called at the start of each new handshake. */
Tff7b72suspend Tff7b72fun Td2a8ffclearLoraRegionPresetMapTb4b4b4(Tb4b4b4)
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.06s